﻿//  --------------------------------
//  Copyright (c) PK Logix LLC. All rights reserved.
//  This source code is made available under the terms of the GNU General Public License version 2 (GPLv2)
//  http://www.codeplex.com/mvcclubsite/license
//  ---------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MVCClubSite.Model;

namespace MVCClubSite.IDAL
{
    /// <summary>
    /// Interface for Announcements DAL
    /// </summary>
    public interface IAnnouncements
    {
        /// <summary>
        /// Method to get all announcements
        /// </summary>
        /// <returns>A list of announcements</returns>
        IQueryable<Announcement> GetAllAnnouncements();

        /// <summary>
        /// Method to get all visible announcements
        /// </summary>
        /// <returns>A list of announcements</returns>
        IQueryable<Announcement> GetVisibleAnnouncements();

        /// <summary>
        /// Method to get the most recent announcements
        /// </summary>
        /// <param name="count">Number of announcements to return</param>
        /// <returns>A list of announcements</returns>
        IQueryable<Announcement> GetRecentAnnouncements(int count);

        /// <summary>
        /// Method to get an announcement by the announcement id
        /// </summary>
        /// <param name="id">ID of the announcement to return</param>
        /// <returns>An announcement business entitiy</returns>
        Announcement GetAnnouncementByID(int id);

        /// <summary>
        /// Method to insert or update an announcement
        /// </summary>
        /// <param name="announcement">announcement to insert or update</param>
        void Save(Announcement announcement);

        /// <summary>
        /// Method to delete an announcement
        /// </summary>
        /// <param name="id">ID of the announcement to delete</param>
        void Delete(int id);
    }
}
